#!/bin/bash

[ ${DAVSITE} ] || exit 0

MOUNTPOINT=/mnt/respaldo
mkdir -p /mnt/respaldo

mount -t davfs ${DAVSITE} ${MOUNTPOINT}

case $? in
0)
	echo "Conexion remota exitosa"
	;;
*)
	echo "Error, no pude establecer conexion con ${DAVSITE}"
	exit 1
	;;
esac

$(which rsync) -zrv ${ROOT} ${MOUNTPOINT}
umount ${MOUNTPOINT}
exit 0





